using IQIGame.Onigao.GamePlay;
using NetProtocol.Enum;

namespace IQIGame.Onigao.Logic
{
    /// <summary>
    /// 开启小游戏
    /// </summary>
    public class ExecStartMiniGame : BaseServiceExecution
    {
        public override void Execute(LevelRegion region, LevelPlayer player)
        {
            if (player == null)
            {
                LogicLog.LogError("Error：player == null，小游戏必须由玩家触发");
                return;
            }
            var config = _config as ExecParamStartMiniGame;
            region.NotifyStartMiniGame(player, (LevelMiniGameType)config.type, config.cid);
        }
    }
}
